<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>活动详情</title>
    <script src="/static/bflow/assets/js/scriptLib.js"></script>
    <!-- bootstrap-validator -->
    <script src="https://cdn.bootcss.com/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
    <script type="text/javascript">
        $(function () {
            var id = getBrowserQueryVar("id");
            HttpUtil.ajaxAsyncJsonPost("/bflow/act/get", {id: id}, function(data){
                console.log("data", data);
                FormUtil.bindViewData("viewForm", data);
                $("#status").html(getCommStatusLabel(data.status));
                $("#assigneeType").html(formatterAssigneeType(data.assigneeType));
            });
        });

        function formatterAssigneeType(value) {
            var text;
            if("ASSIGN_USER_ID" == value){
                text = "手动分派用户";
            }else if("ASSIGN_ROLE_KEY" == value){
                text = "手动分派角色";
            }else if("USER_ID" == value){
                text = "指定用户";
            }else if("ROLE_KEY" == value){
                text = "指定角色";
            }
            return text;
        }
    </script>
</head>
<body>
<div class="container">
    <div class="page-header">
        <h1 id="title"><span class="title">活动详情</span>
            <small><a href="/static/bflow/ui/define/actList.html" class="btn btn-outline btn-default">返回列表</a></small>
        </h1>
    </div>
    <form id="viewForm" role="form" class="form-horizontal">
        <div class="row">
            <div class="form-group">
                <label class="col-sm-3 control-label">ID：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="id"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">活动标识：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="key"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">活动名称：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="name"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">参与者类型：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="assigneeType"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">参与者标识：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="assignee"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">描述：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="desc"></p>
                    </textarea>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="status"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="createTime"></p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">修改时间：</label>
                <div class="col-sm-9">
                    <p class="form-control-static" id="updateTime"></p>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12 col-sm-offset-3">
                    <!--<button class="btn btn-default" type="submit">取消</button>-->
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>

